package com.cloud.mall.pms.service.impl;

import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.pms.dao.PortalProductDao;
import com.cloud.mall.pms.dto.CartProduct;
import com.cloud.mall.pms.dto.promontion.PromotionProduct;
import com.cloud.mall.pms.service.PortalProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PortalProductServiceImpl implements PortalProductService {
    @Autowired
    private PortalProductDao portalProductDao;
    @Override
    public BaseResponse<List<PromotionProduct>> getPromotionProductList(List<Long> ids) {
        return BaseResponse.setResultSuccess(portalProductDao.getPromotionProductList(ids));
    }

    @Override
    public BaseResponse<CartProduct> getCartProduct(Long productId) {
        return BaseResponse.setResultSuccess(portalProductDao.getCartProduct(productId));
    }
}
